#include <iostream>
using namespace std;
int main()
{
    string s, t;
    cout<<"Hi! Enter the parentheses:)"<<endl;
    getline(cin,s);      // (){}[]<>
    int a = s.size();
    for (int i = 0;i<a;i++)
        {
        if (s[i] == '('&&t[t.size()-1] == ')'){
                t += s[i];
            }
    if (s[i] == ')' &&t[t.size()-1] == '(')
        {
            t.erase(t.size()-1);
        }
        else if(s[i]  == ')' && t[t.size()-1] !=  '(')
        {
         break;
        }

    }
    if (t=="")
    {
        cout<<"yes";
    }
    else
    {
        cout<<"no";
    }
}
